This command lets you import any structured text file into XML Spy and convert it to XML format immediately. This is especially useful when you want to import legacy data from older systems, because most software products support a text export interface of some sorts.
In order to convert the data into Unicode (which is the basis of all XML documents), you need to specify which character-set the file is encoded in. For US or Western European Windows systems this will most likely be Codepage 1252, which is also referred to as the ANSI encoding. If you are importing 16-bit or 32-bit Unicode (UCS-2, UTF-16, or UCS-4) files, you can also switch between little-endian and big-endian byte order.
To successfully import a text file, you need to specify the field delimiter that is used to separate columns or fields within the file. XML Spy will auto-detect common row separators (CR, LF, or CR+LF).
Some text files exported from legacy systems enclose textual values in quotes to better distinguish them from numeric values. If this is the case, XML Spy lets you specify what kind of quotes are being used in your file and will remove these quotes automatically when the data is imported.
It is also very common for such text files to contain the actual field names in the first row within the file. XML Spy gives you a checkbox so that you can automatically set your XML element or attribute names according to this information.
Click on the "Choose file" button to select a file to be imported. This file will be rememberd the next time you enter this dialog again, so that you can easily change settings and reimport a file if the resulting XML file does not match your expectations.
Once you have selected the file to be imported, XML Spy will automatically give you a preview of the data contained in the file. Any change in the above options will be reflected in the preview immediately.
You can simply rename any field or column by clicking on its title to edit the name.
XML Spy also lets you choose, whether you wish to import a column as an attribute, element, or if you'd rather skip the column entirely. Simply click on the symbols to the left of the column titles to toggle between these three options.
|
|